package com.group4.datafactorybackend.entity.DTO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author xin
 * @date 2022/7/20
 * @description 码表配置实体类 TODO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StopwatchConfigDTO {

    /**
     * 码值取值
     */
    @Length(max = 10, message = "码值取值长度不能超过30")
    @NotBlank(message = "码值取值不能为空")
    private String encodingValue;

    /**
     * 码值名称
     */
    @Pattern(regexp = "^[a-zA-Z\\u4e00-\\u9fa5]*$",message = "中文名称只支持中文及英文大小写")
    @Length(max = 30, message = "码值名称长度不能超过30")
    @NotBlank(message = "码值名称不能为空")
    private String encodingName;

    /**
     * 码值含义
     */
    @Length(max = 200, message = "码值含义长度不能超过200")
    private String encodingMeaning;
}
